<template>
	<div class="box" @click="clickFn">
		<img src="https://res.bestcake.com\m-images\order\reduce-1.png" />
	</div>
</template>

<script>
	export default{
		name:"subtract",
		props:['num','goodsId'],
		methods:{
			clickFn(){
				let  result = this.num;
				result = result-1;
				this.$emit("clickHandle",{result:result,goodsId:this.goodsId})
			}
		}
	}
</script>

<style scoped="scoped">
	@import url("../css/publice.css");
	.box{
		width: 100%;
		height: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.box img{
		width: 0.1rem;
		height: 0.1rem;
	}
</style>
